package services;

import domain.entities.InvestigadorProtocoloCentro;
import domain.entities.Role;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Guillermo
 * Date: 24/08/12
 * Time: 15:16
 * To change this template use File | Settings | File Templates.
 */
public class CriteriaRole extends Criteria{

    private Role role;

    public CriteriaRole(Role role) {
        this.role = role;
    }

    @Override
    public boolean isIn(Object element){
        boolean isIn = true;

        Role other = (Role)element;

        isIn &= isSubstring(role.getDescripcion(),other.getDescripcion());
        return isIn;
    }
}